home *** CD-ROM | disk | FTP | other *** search
- // intruder.cpp
- // 1993 DAS Software Publications
- #include <iostream.h>
- #include <iomanip.h> // for setw()
- #include <process.h> // for exit()
- #include <conio.h> // for getche()
- #include <dos.h> // for sound(), nosound(), etc.
-
- void main()
- { // begin main program
- int i, j;
-
- for (j=1; j<=12; j++) // begin for
- cout << '\n';
- cout << setw(58) << "** STAND BY FOR SECURITY CLEARANCE **" << endl;
- for (j=1; j<=12; j++) // begin for
- cout << '\n';
-
- for (j=1; j<=10; j++) { // begin for
- for (i=500; i<=700; i++) { // begin if
- sound(i); // activate siren
- delay(4);
- } // end if
- if (getche()=='1') { // begin if
- nosound();
- exit(0); // exit if user ok
- } // end if
- } // end for
- LOOP: // if intruder, lock system
- cout << setw(45) << "***** INTRUDER ALERT!!!!! *****" << endl;
- cout << setw(53) << "Unauthorized User Detected!" << endl;
- nosound();
- //goto LOOP;
- } // end program
-
-